#include "ws2812b_core.h"

void example_2(COLOR *buf, uint16_t buf_len, uint16_t *stept)
{
    uint16_t lstept = *stept;
    
    switch(lstept)
    {
        case 0:
            for(uint8_t i=0; i<buf_len; i++){
                buf[i].r = 0xFF;
                buf[i].g = 0;
                buf[i].b = 0;
            }
                
        break;
        
        case 1:
            for(uint8_t i=0; i<buf_len; i++){
                buf[i].r = 0;
                buf[i].g = 0xFF;
                buf[i].b = 0;
            }
        break;
        
        case 2:
            for(uint8_t i=0; i<buf_len; i++){
                buf[i].r = 0;
                buf[i].g = 0;
                buf[i].b = 0xFF;
            }
        break;
                
        default:
        break;
    }
        

    if(*stept < 2){
        (*stept)++;
    }
    else{
        (*stept)=0;
    }
}









